package com.uubx.mapper;


import com.uubx.pojo.Protocols;
import com.uubx.vo.BatchVo;
import com.uubx.vo.ProtocolsVo;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Select;

import java.util.List;
import java.util.Map;

public interface ProtocolsMapper {

    //添加协议信息
   void saveProtocols(Protocols protocols);
    //通过id删除
    @Delete("delete from protocols where id=#{id}")
   void deleteProtocolsById(Long id);
    //通过id查询协议信息
    @Select("select name,lasttime,content,puttime,removetime,status from protocols where id=#{id}")
    Protocols queryProtocolsById(Long id);
    //编辑协议信息
    void updateProtocols(Protocols protocols);
    //查询总记录数
    @Select("select count(*) from protocols")
    Long queryProtocolsCount();
    //分页查询
    List<Map> queryAllProtocols(ProtocolsVo protocolsVo);
    //批量删除
    void BatchDeleteProtocols(BatchVo batchVo);

}
